package com.hundun.vision.biz;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.hundun.vision.biz.robot.StrategyRobot;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;

import javax.annotation.PostConstruct;

@SpringBootApplication(scanBasePackages = {"com.hundun.vision.biz"}, exclude = {DruidDataSourceAutoConfigure.class, DataSourceAutoConfiguration.class})
public class VisionApplication {

    @Autowired
    private StrategyRobot strategyRobot;

    public static void main(String[] args) {
        SpringApplication.run(VisionApplication.class, args);
    }

    @PostConstruct
    public void init() {
        strategyRobot.start();
    }
}
